<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>for in 遍历对象属性</title>
</head>
<body>
    <script>
        var books={
            book1:"《JavaScript前端开发案例教程》",
            book2:"《node.js》",
            book3:"《HTML5移动web开发》",
        };
        for(i in books){
            document.write(books[i]+"<br>");
        }
    </script>
</body>
</html>